package com.yhx.pojo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Objects;

/**
 * 检查项
 * @TableName t_checkitem
 */
@TableName(value ="t_checkitem")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Checkitem implements Serializable {
    public Checkitem(Integer id, String code, String name, String sex, String age, Double price, String type, String attention, String remark) {
        this.id = id;
        this.code = code;
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.price = price;
        this.type = type;
        this.attention = attention;
        this.remark = remark;
    }

    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    @ExcelProperty("id")
    private Integer id;

    /**
     * 
     */
    @ExcelProperty("项目编码")
    private String code;

    /**
     * 
     */
    @ExcelProperty("项目名称")
    private String name;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Checkitem checkitem = (Checkitem) o;
        return Objects.equals(id, checkitem.id) && Objects.equals(code, checkitem.code) && Objects.equals(name, checkitem.name) && Objects.equals(sex, checkitem.sex) && Objects.equals(age, checkitem.age) && Objects.equals(price, checkitem.price) && Objects.equals(type, checkitem.type) && Objects.equals(attention, checkitem.attention) && Objects.equals(remark, checkitem.remark);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, code, name, sex, age, price, type, attention, remark);
    }

    /**
     * 
     */
    @ExcelProperty("性别")
    private String sex;

    /**
     * 
     */
    @ExcelProperty("年龄范围")
    private String age;

    /**
     * 
     */
    @ExcelProperty("价格")
    private Double price;

    /**
     * 查检项类型,分为检查和检验两种
     */
    @ExcelProperty("类型")
    private String type;

    /**
     * 
     */
    @ExcelProperty("注意事项")
    private String attention;

    /**
     * 
     */
    @ExcelProperty("项目说明")
    private String remark;

    /**
     * 
     */
    @ExcelIgnore
    private Integer deleted;

    @TableField(exist = false)
    @ExcelIgnore
    private static final long serialVersionUID = 1L;
}